# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-curio
pkgver=1.6
pkgrel=2
pkgdesc="Curio is a coroutine-based library for concurrent systems programming"
url="https://github.com/dabeaz/curio"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="
	py3-setuptools
	py3-sphinx
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/c/curio/curio-$pkgver.tar.gz
	$pkgname-python-3.12.patch::https://github.com/dabeaz/curio/pull/363.patch"
builddir="$srcdir/curio-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# https://github.com/dabeaz/curio/issues/368
	PYTHONPATH="$PWD/build/lib" pytest -m "not internet" -k "not test_cpu"
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
480824a50055d170cc01e2ab28dc1b276df9ab8dfbd50f3c70fe6e3fe2a745b636a4717f7886463a1ed38d6fc357098239e1718e00c8f983369b72f4e5d20f17  curio-1.6.tar.gz
a9471fb8c0816ac77db03391381ae14ff5f67fbbd5bd0d661446a45170caa407e661b141a817f001785609d1b0a548b2a5a90e6726a5681d157a25d939afcb54  py3-curio-python-3.12.patch
"
